Powerbook G3上安装gentoo
2004年在苹果笔记本上安装Gentoo的过程,其实和x86安装没啥区别,最主要是一些内核驱动、还有引导程序不一样而已,还有pbbuttonsd这些小程序,可以控制键盘背景灯和设置功能键等一些和苹果硬件相关的东西。
我随便某宝搜了一下: 白菜价
很多人不会在苹果电脑上安装非苹果系统,像这种机器,对于苹果用户来说纯垃圾了,其实这种机器跑linux还是很流畅的。
下面是我在PowerBook G3上安装Gentoo的全过程。。
自己做一个备忘录,也给想在Powerbook上装Gentoo的做一个参考。
以下为基本的安装过程,详细请参考Gentoo的文档
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml
基本的安装步骤如下:用2004.3LiveCD进入。
1. 配置网络
#net-setup eth0
回答它几个问题就行了。
2.分区
#mac-fdisk /dev/hda
以下是我的分区。
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 / 12582912 @ 1664 ( 6.0G) Linux native
/dev/hda4 Apple_UNIX_SVR2 swap 1048576 @ 12584576 (512.0M) Linux swap
/dev/hda5 Apple_UNIX_SVR2 /home 6007728 @ 13633152 ( 2.9G) Linux native
Block size=512, Number of Blocks=19640880
DeviceType=0x0, DeviceId=0x0
3.建立文件系统
#mke2fs -j /dev/hda3
#mkswap /dev/hda4
#mke2fs -j /dev/hda5
#swapon /dev/hda4
4.挂载分区
#mount /dev/hda3 /mnt/gentoo
5.解开Stage Tarball用Portgage
#cd /mnt/gentoo
#tar xvjpf /mnt/cdrom/stages/stage3-\*g3\*.tar.bz2
#tar xvjf portage-20040926.tar.bz2 -C /mnt/gentoo/usr
6.设置编译选项
以下是我的make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O3 -pipe -mcpu=750 -fno-strict-aliasing -mpowerpc-gfxopt -mmultiple -mstring"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="~ppc"
USE="acpi cjk nls ppc freetype fbdev f77 java ncurses gpm gtk gtk2 -gnome qt -kde rage128 dvd alsa -arts mmx clisp"
LINGUAS="zh_CN"
7. 挂载分区
#mount -t proc none /mnt/gentoo/proc
#chroot /mnt/gentoo /bin/bash
8.更新系统
#env-update && source /etc/profile
#emerge sync
#emerge --update world
9.安装内核
#emerge gentoo-dev-sources
#cd /usr/src/linux
#make menuconfig
#make all && make menuconfig
#cp vmlinux /boot/kernel-2.6.10
#cp System.map /boot/System.map-2.6.10
#cp .config /boot/config-2.6.10
内核选项就略过吧,太长了。
安装X
#emerge xorg-x11
#emerge Xautoconfig
#Xautoconfig #(自动生成xorg.conf)
#emerge xfce4
#emerge scim-tables
编辑.xinitrc
#nano .xinitrc
export LC_CTYPE=zh_CN
export LANG=zh_CN
export XMODIFIERS="@im=SCIM"
export XIM=SCIM
export XIM_PROGRAM=SCIM
scim -d
exec starxfce4
这样了就行了。不过有些程序字体显示还不是很好。
通过编辑~/.fons.conf
进行字体的替换
字体配置也略过 -,-
Laptop Support
pbbuttonsd is a tool that enables the brightness and volume keys on
most ppc laptops. The current versions also work as a powermanager.gtkpbbuttons gives you a gtk front end for pbbuttonsd (visual
feedback on button presses in X). gtkpbbuttons requires gtk and should be added to your X session file (~/.Xsession
) for best results (so that it is always running while in X).powerprefs ties together with pbbuttonsd, and gives you the ability
to edit settings such as power-management, trackpad options and various other preferences.cpudyn allows cpu speed scaling for longer battery life.
# emerge pbbuttonsd; rc-update add pbbuttonsd default # emerge gtkpbbuttons # emerge powerprefs # emerge cpudyn # rc-update add pbbuttonsd boot # rc-update add cpudyn boot